package com.ls;

import com.ls.expand.MyClassPathXmlApplicationContext;
import com.ls.beans.User;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {
	public static void main(String[] args) {

//		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(BeanConfig.class);
//		User user = (User) context.getBean("user");
//		System.out.println(user.toString());
//		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath*:*.xml");
		ClassPathXmlApplicationContext applicationContext =new ClassPathXmlApplicationContext("classpath*:*.xml");
		User user = (User) applicationContext.getBean("User");
		System.out.println(user.toString());

		Object myFactoryBean = applicationContext.getBean("apples");
		System.out.println(myFactoryBean);
//
//		Object myFactoryBean2 = applicationContext.getBean("&apples");
//		System.out.println(myFactoryBean2);

	}
}
